// $ANTLR 3.4 /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g 2013-11-10 19:51:34

import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

import org.antlr.runtime.debug.*;
import java.io.IOException;
import org.antlr.runtime.tree.*;


@SuppressWarnings({"all", "warnings", "unchecked"})
public class aufgabe1_grammarParser extends DebugParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "GLEICH", "OPERATOR", "RAETSEL", "WHITESPACE", "Z_BLOCK", "'='"
    };

    public static final int EOF=-1;
    public static final int T__9=9;
    public static final int GLEICH=4;
    public static final int OPERATOR=5;
    public static final int RAETSEL=6;
    public static final int WHITESPACE=7;
    public static final int Z_BLOCK=8;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


public static final String[] ruleNames = new String[] {
    "invalidRule", "raetsel", "operator", "zblock"
};

public static final boolean[] decisionCanBacktrack = new boolean[] {
    false, // invalid decision
};

 
    public int ruleLevel = 0;
    public int getRuleLevel() { return ruleLevel; }
    public void incRuleLevel() { ruleLevel++; }
    public void decRuleLevel() { ruleLevel--; }
    public aufgabe1_grammarParser(TokenStream input) {
        this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
    }
    public aufgabe1_grammarParser(TokenStream input, int port, RecognizerSharedState state) {
        super(input, state);
        DebugEventSocketProxy proxy =
            new DebugEventSocketProxy(this,port,adaptor);
        setDebugListener(proxy);
        setTokenStream(new DebugTokenStream(input,proxy));
        try {
            proxy.handshake();
        }
        catch (IOException ioe) {
            reportError(ioe);
        }
        TreeAdaptor adap = new CommonTreeAdaptor();
        setTreeAdaptor(adap);
        proxy.setTreeAdaptor(adap);
    }

public aufgabe1_grammarParser(TokenStream input, DebugEventListener dbg) {
    super(input, dbg);
     
    TreeAdaptor adap = new CommonTreeAdaptor();
    setTreeAdaptor(adap);


}

protected boolean evalPredicate(boolean result, String predicate) {
    dbg.semanticPredicate(result, predicate);
    return result;
}

protected DebugTreeAdaptor adaptor;
public void setTreeAdaptor(TreeAdaptor adaptor) {
    this.adaptor = new DebugTreeAdaptor(dbg,adaptor);


}
public TreeAdaptor getTreeAdaptor() {
    return adaptor;
}

    public String[] getTokenNames() { return aufgabe1_grammarParser.tokenNames; }
    public String getGrammarFileName() { return "/Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g"; }


    public static class raetsel_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "raetsel"
    // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:13:2: raetsel : (a1= zblock o1= operator a2= zblock '=' a3= zblock o2= operator o3= operator o4= operator a4= zblock o5= operator a5= zblock '=' a6= zblock '=' '=' '=' a7= zblock o6= operator a8= zblock '=' a9= zblock ) -> ^( RAETSEL ^( GLEICH ^( $o1 $a1 $a2) $a3) ^( GLEICH ^( $o2 $a1 $a4) $a7) ^( GLEICH ^( $o3 $a2 $a5) $a8) ^( GLEICH ^( $o4 $a3 $a6) $a9) ^( GLEICH ^( $o5 $a4 $a5) $a6) ^( GLEICH ^( $o6 $a7 $a8) $a9) ) ;
    public final aufgabe1_grammarParser.raetsel_return raetsel() throws RecognitionException {
        aufgabe1_grammarParser.raetsel_return retval = new aufgabe1_grammarParser.raetsel_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token char_literal1=null;
        Token char_literal2=null;
        Token char_literal3=null;
        Token char_literal4=null;
        Token char_literal5=null;
        Token char_literal6=null;
        aufgabe1_grammarParser.zblock_return a1 =null;

        aufgabe1_grammarParser.operator_return o1 =null;

        aufgabe1_grammarParser.zblock_return a2 =null;

        aufgabe1_grammarParser.zblock_return a3 =null;

        aufgabe1_grammarParser.operator_return o2 =null;

        aufgabe1_grammarParser.operator_return o3 =null;

        aufgabe1_grammarParser.operator_return o4 =null;

        aufgabe1_grammarParser.zblock_return a4 =null;

        aufgabe1_grammarParser.operator_return o5 =null;

        aufgabe1_grammarParser.zblock_return a5 =null;

        aufgabe1_grammarParser.zblock_return a6 =null;

        aufgabe1_grammarParser.zblock_return a7 =null;

        aufgabe1_grammarParser.operator_return o6 =null;

        aufgabe1_grammarParser.zblock_return a8 =null;

        aufgabe1_grammarParser.zblock_return a9 =null;


        CommonTree char_literal1_tree=null;
        CommonTree char_literal2_tree=null;
        CommonTree char_literal3_tree=null;
        CommonTree char_literal4_tree=null;
        CommonTree char_literal5_tree=null;
        CommonTree char_literal6_tree=null;
        RewriteRuleTokenStream stream_9=new RewriteRuleTokenStream(adaptor,"token 9");
        RewriteRuleSubtreeStream stream_zblock=new RewriteRuleSubtreeStream(adaptor,"rule zblock");
        RewriteRuleSubtreeStream stream_operator=new RewriteRuleSubtreeStream(adaptor,"rule operator");
        try { dbg.enterRule(getGrammarFileName(), "raetsel");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(13, 1);

        try {
            // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:13:9: ( (a1= zblock o1= operator a2= zblock '=' a3= zblock o2= operator o3= operator o4= operator a4= zblock o5= operator a5= zblock '=' a6= zblock '=' '=' '=' a7= zblock o6= operator a8= zblock '=' a9= zblock ) -> ^( RAETSEL ^( GLEICH ^( $o1 $a1 $a2) $a3) ^( GLEICH ^( $o2 $a1 $a4) $a7) ^( GLEICH ^( $o3 $a2 $a5) $a8) ^( GLEICH ^( $o4 $a3 $a6) $a9) ^( GLEICH ^( $o5 $a4 $a5) $a6) ^( GLEICH ^( $o6 $a7 $a8) $a9) ) )
            dbg.enterAlt(1);

            // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:13:11: (a1= zblock o1= operator a2= zblock '=' a3= zblock o2= operator o3= operator o4= operator a4= zblock o5= operator a5= zblock '=' a6= zblock '=' '=' '=' a7= zblock o6= operator a8= zblock '=' a9= zblock )
            {
            dbg.location(13,11);
            // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:13:11: (a1= zblock o1= operator a2= zblock '=' a3= zblock o2= operator o3= operator o4= operator a4= zblock o5= operator a5= zblock '=' a6= zblock '=' '=' '=' a7= zblock o6= operator a8= zblock '=' a9= zblock )
            dbg.enterAlt(1);

            // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:13:13: a1= zblock o1= operator a2= zblock '=' a3= zblock o2= operator o3= operator o4= operator a4= zblock o5= operator a5= zblock '=' a6= zblock '=' '=' '=' a7= zblock o6= operator a8= zblock '=' a9= zblock
            {
            dbg.location(13,15);
            pushFollow(FOLLOW_zblock_in_raetsel53);
            a1=zblock();

            state._fsp--;

            stream_zblock.add(a1.getTree());
            dbg.location(13,25);
            pushFollow(FOLLOW_operator_in_raetsel57);
            o1=operator();

            state._fsp--;

            stream_operator.add(o1.getTree());
            dbg.location(13,37);
            pushFollow(FOLLOW_zblock_in_raetsel61);
            a2=zblock();

            state._fsp--;

            stream_zblock.add(a2.getTree());
            dbg.location(13,45);
            char_literal1=(Token)match(input,9,FOLLOW_9_in_raetsel63);  
            stream_9.add(char_literal1);

            dbg.location(13,51);
            pushFollow(FOLLOW_zblock_in_raetsel67);
            a3=zblock();

            state._fsp--;

            stream_zblock.add(a3.getTree());
            dbg.location(14,9);
            pushFollow(FOLLOW_operator_in_raetsel77);
            o2=operator();

            state._fsp--;

            stream_operator.add(o2.getTree());
            dbg.location(14,21);
            pushFollow(FOLLOW_operator_in_raetsel81);
            o3=operator();

            state._fsp--;

            stream_operator.add(o3.getTree());
            dbg.location(14,33);
            pushFollow(FOLLOW_operator_in_raetsel85);
            o4=operator();

            state._fsp--;

            stream_operator.add(o4.getTree());
            dbg.location(15,9);
            pushFollow(FOLLOW_zblock_in_raetsel95);
            a4=zblock();

            state._fsp--;

            stream_zblock.add(a4.getTree());
            dbg.location(15,19);
            pushFollow(FOLLOW_operator_in_raetsel99);
            o5=operator();

            state._fsp--;

            stream_operator.add(o5.getTree());
            dbg.location(15,31);
            pushFollow(FOLLOW_zblock_in_raetsel103);
            a5=zblock();

            state._fsp--;

            stream_zblock.add(a5.getTree());
            dbg.location(15,39);
            char_literal2=(Token)match(input,9,FOLLOW_9_in_raetsel105);  
            stream_9.add(char_literal2);

            dbg.location(15,45);
            pushFollow(FOLLOW_zblock_in_raetsel109);
            a6=zblock();

            state._fsp--;

            stream_zblock.add(a6.getTree());
            dbg.location(16,7);
            char_literal3=(Token)match(input,9,FOLLOW_9_in_raetsel117);  
            stream_9.add(char_literal3);

            dbg.location(16,11);
            char_literal4=(Token)match(input,9,FOLLOW_9_in_raetsel119);  
            stream_9.add(char_literal4);

            dbg.location(16,15);
            char_literal5=(Token)match(input,9,FOLLOW_9_in_raetsel121);  
            stream_9.add(char_literal5);

            dbg.location(17,9);
            pushFollow(FOLLOW_zblock_in_raetsel131);
            a7=zblock();

            state._fsp--;

            stream_zblock.add(a7.getTree());
            dbg.location(17,19);
            pushFollow(FOLLOW_operator_in_raetsel135);
            o6=operator();

            state._fsp--;

            stream_operator.add(o6.getTree());
            dbg.location(17,31);
            pushFollow(FOLLOW_zblock_in_raetsel139);
            a8=zblock();

            state._fsp--;

            stream_zblock.add(a8.getTree());
            dbg.location(17,39);
            char_literal6=(Token)match(input,9,FOLLOW_9_in_raetsel141);  
            stream_9.add(char_literal6);

            dbg.location(17,45);
            pushFollow(FOLLOW_zblock_in_raetsel145);
            a9=zblock();

            state._fsp--;

            stream_zblock.add(a9.getTree());

            }


            // AST REWRITE
            // elements: o6, a1, o3, a2, a5, o1, a2, a4, a4, a9, a5, a9, a6, a8, a7, a1, a3, o2, a6, a3, o5, a8, a7, o4
            // token labels: 
            // rule labels: retval, o2, o1, o4, o3, o6, o5, a9, a1, a2, a3, a4, a5, a6, a7, a8
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_o2=new RewriteRuleSubtreeStream(adaptor,"rule o2",o2!=null?o2.tree:null);
            RewriteRuleSubtreeStream stream_o1=new RewriteRuleSubtreeStream(adaptor,"rule o1",o1!=null?o1.tree:null);
            RewriteRuleSubtreeStream stream_o4=new RewriteRuleSubtreeStream(adaptor,"rule o4",o4!=null?o4.tree:null);
            RewriteRuleSubtreeStream stream_o3=new RewriteRuleSubtreeStream(adaptor,"rule o3",o3!=null?o3.tree:null);
            RewriteRuleSubtreeStream stream_o6=new RewriteRuleSubtreeStream(adaptor,"rule o6",o6!=null?o6.tree:null);
            RewriteRuleSubtreeStream stream_o5=new RewriteRuleSubtreeStream(adaptor,"rule o5",o5!=null?o5.tree:null);
            RewriteRuleSubtreeStream stream_a9=new RewriteRuleSubtreeStream(adaptor,"rule a9",a9!=null?a9.tree:null);
            RewriteRuleSubtreeStream stream_a1=new RewriteRuleSubtreeStream(adaptor,"rule a1",a1!=null?a1.tree:null);
            RewriteRuleSubtreeStream stream_a2=new RewriteRuleSubtreeStream(adaptor,"rule a2",a2!=null?a2.tree:null);
            RewriteRuleSubtreeStream stream_a3=new RewriteRuleSubtreeStream(adaptor,"rule a3",a3!=null?a3.tree:null);
            RewriteRuleSubtreeStream stream_a4=new RewriteRuleSubtreeStream(adaptor,"rule a4",a4!=null?a4.tree:null);
            RewriteRuleSubtreeStream stream_a5=new RewriteRuleSubtreeStream(adaptor,"rule a5",a5!=null?a5.tree:null);
            RewriteRuleSubtreeStream stream_a6=new RewriteRuleSubtreeStream(adaptor,"rule a6",a6!=null?a6.tree:null);
            RewriteRuleSubtreeStream stream_a7=new RewriteRuleSubtreeStream(adaptor,"rule a7",a7!=null?a7.tree:null);
            RewriteRuleSubtreeStream stream_a8=new RewriteRuleSubtreeStream(adaptor,"rule a8",a8!=null?a8.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 18:7: -> ^( RAETSEL ^( GLEICH ^( $o1 $a1 $a2) $a3) ^( GLEICH ^( $o2 $a1 $a4) $a7) ^( GLEICH ^( $o3 $a2 $a5) $a8) ^( GLEICH ^( $o4 $a3 $a6) $a9) ^( GLEICH ^( $o5 $a4 $a5) $a6) ^( GLEICH ^( $o6 $a7 $a8) $a9) )
            {
                dbg.location(18,10);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:10: ^( RAETSEL ^( GLEICH ^( $o1 $a1 $a2) $a3) ^( GLEICH ^( $o2 $a1 $a4) $a7) ^( GLEICH ^( $o3 $a2 $a5) $a8) ^( GLEICH ^( $o4 $a3 $a6) $a9) ^( GLEICH ^( $o5 $a4 $a5) $a6) ^( GLEICH ^( $o6 $a7 $a8) $a9) )
                {
                CommonTree root_1 = (CommonTree)adaptor.nil();
                dbg.location(18,12);
                root_1 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(RAETSEL, "RAETSEL")
                , root_1);

                dbg.location(18,20);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:20: ^( GLEICH ^( $o1 $a1 $a2) $a3)
                {
                CommonTree root_2 = (CommonTree)adaptor.nil();
                dbg.location(18,22);
                root_2 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(GLEICH, "GLEICH")
                , root_2);

                dbg.location(18,29);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:29: ^( $o1 $a1 $a2)
                {
                CommonTree root_3 = (CommonTree)adaptor.nil();
                dbg.location(18,32);
                root_3 = (CommonTree)adaptor.becomeRoot(stream_o1.nextNode(), root_3);

                dbg.location(18,36);
                adaptor.addChild(root_3, stream_a1.nextTree());
                dbg.location(18,40);
                adaptor.addChild(root_3, stream_a2.nextTree());

                adaptor.addChild(root_2, root_3);
                }
                dbg.location(18,45);
                adaptor.addChild(root_2, stream_a3.nextTree());

                adaptor.addChild(root_1, root_2);
                }
                dbg.location(18,49);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:49: ^( GLEICH ^( $o2 $a1 $a4) $a7)
                {
                CommonTree root_2 = (CommonTree)adaptor.nil();
                dbg.location(18,51);
                root_2 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(GLEICH, "GLEICH")
                , root_2);

                dbg.location(18,58);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:58: ^( $o2 $a1 $a4)
                {
                CommonTree root_3 = (CommonTree)adaptor.nil();
                dbg.location(18,61);
                root_3 = (CommonTree)adaptor.becomeRoot(stream_o2.nextNode(), root_3);

                dbg.location(18,65);
                adaptor.addChild(root_3, stream_a1.nextTree());
                dbg.location(18,69);
                adaptor.addChild(root_3, stream_a4.nextTree());

                adaptor.addChild(root_2, root_3);
                }
                dbg.location(18,74);
                adaptor.addChild(root_2, stream_a7.nextTree());

                adaptor.addChild(root_1, root_2);
                }
                dbg.location(18,78);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:78: ^( GLEICH ^( $o3 $a2 $a5) $a8)
                {
                CommonTree root_2 = (CommonTree)adaptor.nil();
                dbg.location(18,80);
                root_2 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(GLEICH, "GLEICH")
                , root_2);

                dbg.location(18,87);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:87: ^( $o3 $a2 $a5)
                {
                CommonTree root_3 = (CommonTree)adaptor.nil();
                dbg.location(18,90);
                root_3 = (CommonTree)adaptor.becomeRoot(stream_o3.nextNode(), root_3);

                dbg.location(18,94);
                adaptor.addChild(root_3, stream_a2.nextTree());
                dbg.location(18,98);
                adaptor.addChild(root_3, stream_a5.nextTree());

                adaptor.addChild(root_2, root_3);
                }
                dbg.location(18,103);
                adaptor.addChild(root_2, stream_a8.nextTree());

                adaptor.addChild(root_1, root_2);
                }
                dbg.location(18,107);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:107: ^( GLEICH ^( $o4 $a3 $a6) $a9)
                {
                CommonTree root_2 = (CommonTree)adaptor.nil();
                dbg.location(18,109);
                root_2 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(GLEICH, "GLEICH")
                , root_2);

                dbg.location(18,116);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:116: ^( $o4 $a3 $a6)
                {
                CommonTree root_3 = (CommonTree)adaptor.nil();
                dbg.location(18,119);
                root_3 = (CommonTree)adaptor.becomeRoot(stream_o4.nextNode(), root_3);

                dbg.location(18,123);
                adaptor.addChild(root_3, stream_a3.nextTree());
                dbg.location(18,127);
                adaptor.addChild(root_3, stream_a6.nextTree());

                adaptor.addChild(root_2, root_3);
                }
                dbg.location(18,132);
                adaptor.addChild(root_2, stream_a9.nextTree());

                adaptor.addChild(root_1, root_2);
                }
                dbg.location(18,136);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:136: ^( GLEICH ^( $o5 $a4 $a5) $a6)
                {
                CommonTree root_2 = (CommonTree)adaptor.nil();
                dbg.location(18,138);
                root_2 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(GLEICH, "GLEICH")
                , root_2);

                dbg.location(18,145);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:145: ^( $o5 $a4 $a5)
                {
                CommonTree root_3 = (CommonTree)adaptor.nil();
                dbg.location(18,148);
                root_3 = (CommonTree)adaptor.becomeRoot(stream_o5.nextNode(), root_3);

                dbg.location(18,152);
                adaptor.addChild(root_3, stream_a4.nextTree());
                dbg.location(18,156);
                adaptor.addChild(root_3, stream_a5.nextTree());

                adaptor.addChild(root_2, root_3);
                }
                dbg.location(18,161);
                adaptor.addChild(root_2, stream_a6.nextTree());

                adaptor.addChild(root_1, root_2);
                }
                dbg.location(18,165);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:165: ^( GLEICH ^( $o6 $a7 $a8) $a9)
                {
                CommonTree root_2 = (CommonTree)adaptor.nil();
                dbg.location(18,167);
                root_2 = (CommonTree)adaptor.becomeRoot(
                (CommonTree)adaptor.create(GLEICH, "GLEICH")
                , root_2);

                dbg.location(18,174);
                // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:18:174: ^( $o6 $a7 $a8)
                {
                CommonTree root_3 = (CommonTree)adaptor.nil();
                dbg.location(18,177);
                root_3 = (CommonTree)adaptor.becomeRoot(stream_o6.nextNode(), root_3);

                dbg.location(18,181);
                adaptor.addChild(root_3, stream_a7.nextTree());
                dbg.location(18,185);
                adaptor.addChild(root_3, stream_a8.nextTree());

                adaptor.addChild(root_2, root_3);
                }
                dbg.location(18,190);
                adaptor.addChild(root_2, stream_a9.nextTree());

                adaptor.addChild(root_1, root_2);
                }

                adaptor.addChild(root_0, root_1);
                }

            }


            retval.tree = root_0;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(18, 193);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "raetsel");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return retval;
    }
    // $ANTLR end "raetsel"


    public static class zblock_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "zblock"
    // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:20:1: zblock : Z_BLOCK ;
    public final aufgabe1_grammarParser.zblock_return zblock() throws RecognitionException {
        aufgabe1_grammarParser.zblock_return retval = new aufgabe1_grammarParser.zblock_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token Z_BLOCK7=null;

        CommonTree Z_BLOCK7_tree=null;

        try { dbg.enterRule(getGrammarFileName(), "zblock");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(20, 0);

        try {
            // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:20:8: ( Z_BLOCK )
            dbg.enterAlt(1);

            // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:20:10: Z_BLOCK
            {
            root_0 = (CommonTree)adaptor.nil();


            dbg.location(20,10);
            Z_BLOCK7=(Token)match(input,Z_BLOCK,FOLLOW_Z_BLOCK_in_zblock276); 
            Z_BLOCK7_tree = 
            (CommonTree)adaptor.create(Z_BLOCK7)
            ;
            adaptor.addChild(root_0, Z_BLOCK7_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(20, 16);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "zblock");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return retval;
    }
    // $ANTLR end "zblock"


    public static class operator_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "operator"
    // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:22:1: operator : OPERATOR ;
    public final aufgabe1_grammarParser.operator_return operator() throws RecognitionException {
        aufgabe1_grammarParser.operator_return retval = new aufgabe1_grammarParser.operator_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token OPERATOR8=null;

        CommonTree OPERATOR8_tree=null;

        try { dbg.enterRule(getGrammarFileName(), "operator");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(22, 0);

        try {
            // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:23:3: ( OPERATOR )
            dbg.enterAlt(1);

            // /Users/iamapo/Desktop/CI Praktikum 2/aufgabe1_grammar.g:23:3: OPERATOR
            {
            root_0 = (CommonTree)adaptor.nil();


            dbg.location(23,3);
            OPERATOR8=(Token)match(input,OPERATOR,FOLLOW_OPERATOR_in_operator287); 
            OPERATOR8_tree = 
            (CommonTree)adaptor.create(OPERATOR8)
            ;
            adaptor.addChild(root_0, OPERATOR8_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(23, 10);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "operator");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return retval;
    }
    // $ANTLR end "operator"

    // Delegated rules


 

    public static final BitSet FOLLOW_zblock_in_raetsel53 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_operator_in_raetsel57 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_zblock_in_raetsel61 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_9_in_raetsel63 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_zblock_in_raetsel67 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_operator_in_raetsel77 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_operator_in_raetsel81 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_operator_in_raetsel85 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_zblock_in_raetsel95 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_operator_in_raetsel99 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_zblock_in_raetsel103 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_9_in_raetsel105 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_zblock_in_raetsel109 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_9_in_raetsel117 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_9_in_raetsel119 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_9_in_raetsel121 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_zblock_in_raetsel131 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_operator_in_raetsel135 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_zblock_in_raetsel139 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_9_in_raetsel141 = new BitSet(new long[]{0x0000000000000100L});
    public static final BitSet FOLLOW_zblock_in_raetsel145 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Z_BLOCK_in_zblock276 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_OPERATOR_in_operator287 = new BitSet(new long[]{0x0000000000000002L});

}